package com.example.feignApi;

import com.example.config.ProductFeignConfig;
import com.example.mall.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @ClassName ProductFeignApi
 * @Description TODO
 * @Author: XMK
 * @Date: 2020/4/7 15:18
 *
 * @Version: 1.0
 */
@FeignClient(name = "product-center", url = "http://localhost:82", configuration = ProductFeignConfig.class)
//@FeignClient(name = "product-center", configuration = ProductFeignConfig.class)
@RequestMapping("/product")
public interface ProductFeignApi {
    @GetMapping("/selectProductListByType/{productType}")
    public List<Product> selectProductListByType(@PathVariable("productType") String productType);

    @GetMapping("/getAccessToken/{sistsec}")
    public String getAccessToken(@PathVariable("sistsec") String sistsec);
}
